<%@ page language="java" pageEncoding="utf-8"%>
<%@ include file="/common/taglibs.jsp"%>


<c:set  value="${param.userId }"  var="userId"></c:set>
<c:if test="${empty param.userId }"><!-- userName -->
    
     <nativeSql:sqlQueryForUnique
				sql="select f_id as userId from app_user where f_username = ${param.userName }"
				id="userId" />
 
</c:if>

<c:if test="${ empty userId}">
            抱歉，该用户不存在
</c:if>

<c:if test="${not  empty userId}">
<div>
<nativeSql:sqlQueryForList
	sql="select  *  from app_user where f_id = ${ userId }"
	id="userPersonalInfo" />
<nativeSql:sqlQueryForList
	sql="select  *  from t_article where f_creator_id = ${ userId }  order by f_id desc  limit 0,3"
	id="userArticlesInfo" />
	<table width=100% height=100% border="0" cellspacing=0 cellpadding=6
		style="border: 0px solid red">
		<tr colspan="2">

			<img style="width: 100px; height: 100px;"
				title="${userPersonalInfo[0].f_username}"
				src="${ctx}/user/file.action?method:previewPic&fileId=${userPersonalInfo[0].f_picture_appended }"></img>

			<span style="float: right;"> ${userPersonalInfo[0].f_username}<br>
				<strong>真实姓名：</strong><c:if test="${empty userPersonalInfo[0].f_realname }"> 该用户还没有此项信息 </c:if>  ${userPersonalInfo[0].f_realname} <br> 
				<strong>联系方式：</strong><c:if test="${empty userPersonalInfo[0].f_email }"> 该用户还没有此项信息 </c:if>${userPersonalInfo[0].f_email}<br>
			</span>

		</tr>

		<th align="left"><strong>最新博文：</strong></th>
		<td  align="left">
			<ul>

				<c:forEach items="${userArticlesInfo }" var="userArticleInfo">
					<li><a
						href="${ctx }/blog/blog.action?method:article=wwww&articleId=${userArticleInfo.f_id}&title=${userArticleInfo.f_title}"
						target="_blank">${userArticleInfo.f_title}</a>
				</c:forEach>

			</ul>
		</td>


		<tr>

		</tr>

		<tr>

			<th align="left"><strong>个人简介：</strong></th>
			<td><c:if test="${empty userPersonalInfo[0].f_about }"> 该用户还没有此项信息 </c:if>${userPersonalInfo[0].f_about}</td>

		</tr>





	</table>
	</div>
</c:if>


